﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SearchFileIformation
{
    public class Article
    {
        public int id { get; set; }
        public int categoryId { get; set; }
        public string title { get; set; }
        public string titleImg { get; set; }
        public int type { get; set; }
        public string addTime { get; set; }
        public string keywords { get; set; }
        public string author { get; set; }
        public string description { get; set; }
        public string content { get; set; }
        public int publish { get; set; }
        public int audit { get; set; }
        public string fileUrl { get; set; }
        public int showFileUrl { get; set; }
        public int recommend { get; set; }
        //@Column(name = "click_count", nullable = false, columnDefinition = "int unsigned default 0 comment '点击次数'")
        public int clickCount { get; set; }
        // @Column(name = "praise_count", nullable = false, columnDefinition = "int unsigned default 0 comment '赞次数'")
        public int praiseCount { get; set; }
        // @Column(name = "derogate_count", nullable = false, columnDefinition = "int unsigned default 0 comment '踩次数'")
        public int derogateCount { get; set; }
        //@Column(name = "share_count", nullable = false, columnDefinition = "int unsigned default 0 comment '分享次数'")
        public int shareCount { get; set; }
        // @Column(name = "comment_count", nullable = false, columnDefinition = "int unsigned default 0 comment '评论次数'")
        public int commentCount { get; set; }

        // @Column(name = "cache_address", nullable = false, columnDefinition = "varchar(255) comment '缓存地址'")
        public string cacheAddress { get; set; }

        //@Column(name = "account_id", nullable = false, columnDefinition = "int unsigned comment '关联账号id'")
        public int accountId { get; set; }
        public Article() { }
        public Article(string description, int publish, int audit, string fileUrl, int recommend = 1,
            string author = "……", int clickCount = 1, int praiseCount = 111111, int derogateCoun = 111111, int shareCount = 1,
            int commentCount = 1, string cacheAddress = "")
        {
            this.author = author;
            this.description = description;
            this.publish = publish;
            this.audit = audit;
            this.author = author;
            this.fileUrl = fileUrl;
            this.recommend = recommend;
            this.clickCount = clickCount;
            this.praiseCount = praiseCount;
            this.derogateCount = derogateCount;
            this.shareCount = shareCount;
            this.commentCount = commentCount;
            this.cacheAddress = cacheAddress;
        }
    }
}
